package com.ruoyi.slope.ai.domain;

import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 调用/作业记录对象 slope_ai_invocation_job
 * 
 * @author ruoyi
 * @date 2025-09-05
 */
public class SlopeAiInvocationJob extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 作业ID */
    private String jobId;

    /** 模块ID，关联module_registry */
    @Excel(name = "模块ID，关联module_registry")
    private String moduleId;

    /** 绑定ID，关联module_binding */
    @Excel(name = "绑定ID，关联module_binding")
    private String bindingId;

    /** 触发来源：manual/cron/alert/api */
    @Excel(name = "触发来源：manual/cron/alert/api")
    private String triggerSource;

    /** 运行时实参 */
    @Excel(name = "运行时实参")
    private String paramsJson;

    /** 输入引用（URI/时间窗） */
    @Excel(name = "输入引用", readConverterExp = "U=RI/时间窗")
    private String inputRefs;

    /** 开始时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "开始时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date startTime;

    /** 结束时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "结束时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date endTime;

    /** 耗时（毫秒） */
    @Excel(name = "耗时", readConverterExp = "毫=秒")
    private Long durationMs;

    /** 状态：queued/running/success/failed */
    @Excel(name = "状态：queued/running/success/failed")
    private String status;

    /** 产物（URI/ID） */
    @Excel(name = "产物", readConverterExp = "U=RI/ID")
    private String outputRefs;

    /** 失败原因 */
    @Excel(name = "失败原因")
    private String errorMsg;

    /** 触发人/系统 */
    @Excel(name = "触发人/系统")
    private String operator;

    public void setJobId(String jobId) 
    {
        this.jobId = jobId;
    }

    public String getJobId() 
    {
        return jobId;
    }

    public void setModuleId(String moduleId) 
    {
        this.moduleId = moduleId;
    }

    public String getModuleId() 
    {
        return moduleId;
    }

    public void setBindingId(String bindingId) 
    {
        this.bindingId = bindingId;
    }

    public String getBindingId() 
    {
        return bindingId;
    }

    public void setTriggerSource(String triggerSource) 
    {
        this.triggerSource = triggerSource;
    }

    public String getTriggerSource() 
    {
        return triggerSource;
    }

    public void setParamsJson(String paramsJson) 
    {
        this.paramsJson = paramsJson;
    }

    public String getParamsJson() 
    {
        return paramsJson;
    }

    public void setInputRefs(String inputRefs) 
    {
        this.inputRefs = inputRefs;
    }

    public String getInputRefs() 
    {
        return inputRefs;
    }

    public void setStartTime(Date startTime) 
    {
        this.startTime = startTime;
    }

    public Date getStartTime() 
    {
        return startTime;
    }

    public void setEndTime(Date endTime) 
    {
        this.endTime = endTime;
    }

    public Date getEndTime() 
    {
        return endTime;
    }

    public void setDurationMs(Long durationMs) 
    {
        this.durationMs = durationMs;
    }

    public Long getDurationMs() 
    {
        return durationMs;
    }

    public void setStatus(String status) 
    {
        this.status = status;
    }

    public String getStatus() 
    {
        return status;
    }

    public void setOutputRefs(String outputRefs) 
    {
        this.outputRefs = outputRefs;
    }

    public String getOutputRefs() 
    {
        return outputRefs;
    }

    public void setErrorMsg(String errorMsg) 
    {
        this.errorMsg = errorMsg;
    }

    public String getErrorMsg() 
    {
        return errorMsg;
    }

    public void setOperator(String operator) 
    {
        this.operator = operator;
    }

    public String getOperator() 
    {
        return operator;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("jobId", getJobId())
            .append("moduleId", getModuleId())
            .append("bindingId", getBindingId())
            .append("triggerSource", getTriggerSource())
            .append("paramsJson", getParamsJson())
            .append("inputRefs", getInputRefs())
            .append("startTime", getStartTime())
            .append("endTime", getEndTime())
            .append("durationMs", getDurationMs())
            .append("status", getStatus())
            .append("outputRefs", getOutputRefs())
            .append("errorMsg", getErrorMsg())
            .append("operator", getOperator())
            .toString();
    }
}
